{% extends "::base.html.twig" %}
{% block javascript %}
<script type="text/javascript">
    audiojs.events.ready(function() {
        var as = audiojs.createAll();
    });
</script>
{% endblock %}
{% block player %}
<script type="text/javascript" src="{{ asset('bundles/musicfrontend/js/controllers/player_server.js') }}"></script>
<div class="current_playlist" ng-controller="player_server">
    <div class="player" ng-show="playlist">
        <audio preload id="pre_play"></audio>
        <ul class="side-nav" id="playlist" ng-show="playlist.length">
            <li ng-repeat="item in playlist" data-id="[[item.song_id]]" class="[[(item.current_played == 1) ? 'playing' : '']]">
                [[item.name]]
            </li>
        </ul>
    </div>
</div>
{% endblock %}